# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-yara-rednaga
_pkgname=yara-python
pkgver=279.32b6a74
pkgrel=9
pkgdesc='The Python interface for YARA.'
url='https://github.com/rednaga/yara-python-1'
arch=('any')
license=('Apache')
makedepends=('python-setuptools' 'git' 'glibc' 'python' 'yara')
provides=('python-yara')
conflicts=('python-yara')
source=("git+https://github.com/VirusTotal/$_pkgname.git")
#        'https://patch-diff.githubusercontent.com/raw/VirusTotal/yara/pull/1073.patch')
sha512sums=('SKIP')
#            'bd49da674b3c9d33ffacb7d7e3ea975d3c0cab2c69305c9c4b950b56498ed147ad3f75f687dac97e555755a365f7930f7888db1e570d42755fbc8e9b738a461a')

prepare() {
  cd "$_pkgname"

  git submodule update --init --recursive

  #patch -p1 < "$srcdir/1073.patch"
}

build() {
  cd "$_pkgname"

  python setup.py build --enable-dex
}

package() {
  cd "$_pkgname"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 README.rst "$pkgdir/usr/share/doc/$pkgname/README"
}

